package com.six.core.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 
 * @TableName tb_receive
 */
@ApiModel(description = "")
@TableName(value ="tb_receive")
@Data
public class Receive implements Serializable {
    /**
     * 售货地址id
     */
    @ApiModelProperty("售货地址id")
    @TableId(type = IdType.AUTO)
    private Integer receiveid;

    /**
     * 用户id
     */
    @ApiModelProperty("用户id")
    private Integer userid;

    /**
     * 收货人姓名
     */
    @ApiModelProperty("收货人姓名")
    private String name;

    /**
     * 收货人手机号
     */
    @ApiModelProperty("收货人手机号")
    private String phone;

    /**
     * 收货地址
     */
    @ApiModelProperty("收货地址")
    private String address;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Receive other = (Receive) that;
        return (this.getReceiveid() == null ? other.getReceiveid() == null : this.getReceiveid().equals(other.getReceiveid()))
            && (this.getUserid() == null ? other.getUserid() == null : this.getUserid().equals(other.getUserid()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
            && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getReceiveid() == null) ? 0 : getReceiveid().hashCode());
        result = prime * result + ((getUserid() == null) ? 0 : getUserid().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", receiveid=").append(receiveid);
        sb.append(", userid=").append(userid);
        sb.append(", name=").append(name);
        sb.append(", phone=").append(phone);
        sb.append(", address=").append(address);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}